///
/// Basic type definition for all CST projects
///
/// @version 1.0.0
/// @author Jun Xu (xujun00@mails.tsinghua.edu.cn)
/// @date 2007/09/12
///
#ifndef _CST_COMMON_BASICTYPES_H_
#define _CST_COMMON_BASICTYPES_H_

#ifdef _MSC_VER
#   pragma warning(disable:4267)
#endif

typedef unsigned char       u_int8;
typedef unsigned short      u_int16;
typedef unsigned int        u_int32;
typedef unsigned long long  u_int64;

///
/// The internal indexing number of pinyin, will be called as i-code for short
/// It is combined by two number together,
/// One is the zero-based index of the pinyin in the pinyin array
/// The other is the tone
/// The combination formula is:
///         i-code = pinyin_index*10+tone
///
typedef unsigned short IndexCode;
static const int INVALID_ICODE          = (IndexCode)-1;     ///< Invalid i-code definition
static const u_int32 INVALID_SAMPLEIDX  = (u_int32)-1;

/// 
/// definition for cepstra vector
/// 
//static const int CEP_DIMENSION          = 16;
//typedef float CepVector[CEP_DIMENSION];

/// common values
static const int MAX_FILE_NAME_LENGTH   = 256;
static const int MAX_LINE_LENGTH        = 1024;
static const int MAX_TEMP_BUFFER_LENGTH = 4*1024*1024;
static const float FLOAT_EPS            = 0.000001f;
#ifdef PI
#undef PI
#endif
static const double PI                  = 3.1415926535897932384626433832795;

#endif
